import os
class LiveConfig(object):
    HOST = 'https://live.chinatravelacademy.com'
    TOKEN = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgxODU1LCJpc3MiOiJodHRwOi8vbGl2ZS5jaGluYXRyYXZlbGFjYWRlbXkuY29tL2F1dGgvYXBwbGV0L2xvZ2luIiwiaWF0IjoxNTE5ODE0MzQyLCJleHAiOjE1MjA0MTkxNDIsIm5iZiI6MTUxOTgxNDM0MiwianRpIjoiRE15RDQzdjRIMXI1bHdqNSJ9.AEtvqUQkQtgDIiWEmzyFG2yY4pqEJVKJjFKDI7rRWko'
    ACTION = {
        'GET_LIST': HOST + '/live/room?__token=' + TOKEN + '&page={}&agency_id=1',
        'GET_SINGLE': HOST + '/live/room/{}/live?__token=' + TOKEN + '&test=1',
    }
    SAVE_IMAGE_PATH = os.getcwd() + '/uploads/'
    if not os.path.exists(SAVE_IMAGE_PATH):
        os.makedirs(SAVE_IMAGE_PATH)
    URLS = []
    for _ in range(1, 9):
        URLS.append(ACTION['GET_LIST'].format(_))

    # print(URLS)
    # print(ACTION['GET_SINGLE'].format(414))
    IMAGE_URLS = [
        {
            "is_video": False,
            "img": "https://live.chinatravelacademy.com/upload/2018/02/07/50_5ab0e6e94f653bdb821835bdec632c88.jpg",
            "video_url": "",
            "video_time": 0
        },
        {
            "is_video": False,
            "img": "https://live.chinatravelacademy.com/upload/2018/02/07/50_12e3aff66729b95fbee4e74151abae8f.jpg",
            "video_url": "",
            "video_time": 0
        },
        {
            "is_video": False,
            "img": "https://live.chinatravelacademy.com/upload/2018/02/07/50_3c75619746b89fcdecec3bde03dcd093.jpg",
            "video_url": "",
            "video_time": 0
        },
        {
            "is_video": True,
            "img": "https://1252139118.vod2.myqcloud.com/8e24db68vodtransgzp1252139118/3d0ecaf17447398154653846152/snapshot/1517987734_3952268150.100_0.jpg",
            "video_url": "http://1252139118.vod2.myqcloud.com/8e24db68vodtransgzp1252139118/3d0ecaf17447398154653846152/v.f20.mp4",
            "video_time": 66
        },
        {
            "is_video": False,
            "img": "https://live.chinatravelacademy.com/upload/2018/02/07/50_d56c341f6e081625e0101cbb580766ff.jpg",
            "video_url": "",
            "video_time": 0
        },
        {
            "is_video": False,
            "img": "https://live.chinatravelacademy.com/upload/2018/02/07/50_113c3d8a0ee2d52888a049f858f0ca18.jpg",
            "video_url": "",
            "video_time": 0
        },
        {
            "is_video": False,
            "img": "https://live.chinatravelacademy.com/upload/2018/02/07/50_03874046ab353aa45757b8f9964f19d9.jpg",
            "video_url": "",
            "video_time": 0
        },
        {
            "is_video": True,
            "img": "https://1252139118.vod2.myqcloud.com/8e24db68vodtransgzp1252139118/3d20e3dc7447398154653856189/snapshot/1517987772_1883481377.100_0.jpg",
            "video_url": "http://1252139118.vod2.myqcloud.com/8e24db68vodtransgzp1252139118/3d20e3dc7447398154653856189/v.f20.mp4",
            "video_time": 106
        },
        {
            "is_video": False,
            "img": "https://live.chinatravelacademy.com/upload/2018/02/07/50_11ec0b60bb8d6ce359638fb8ede688d7.png",
            "video_url": "",
            "video_time": 0
        }
    ]


